/**
 */
package org.xtext.tp4.minigobstones.util;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

import org.xtext.tp4.minigobstones.*;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see org.xtext.tp4.minigobstones.MinigobstonesPackage
 * @generated
 */
public class MinigobstonesSwitch<T> extends Switch<T>
{
  /**
   * The cached model package
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected static MinigobstonesPackage modelPackage;

  /**
   * Creates an instance of the switch.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public MinigobstonesSwitch()
  {
    if (modelPackage == null)
    {
      modelPackage = MinigobstonesPackage.eINSTANCE;
    }
  }

  /**
   * Checks whether this is a switch for the given package.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @parameter ePackage the package in question.
   * @return whether this is a switch for the given package.
   * @generated
   */
  @Override
  protected boolean isSwitchFor(EPackage ePackage)
  {
    return ePackage == modelPackage;
  }

  /**
   * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @return the first non-null result returned by a <code>caseXXX</code> call.
   * @generated
   */
  @Override
  protected T doSwitch(int classifierID, EObject theEObject)
  {
    switch (classifierID)
    {
      case MinigobstonesPackage.INIT_STRUCTURE:
      {
        InitStructure initStructure = (InitStructure)theEObject;
        T result = caseInitStructure(initStructure);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.DEFINITION:
      {
        Definition definition = (Definition)theEObject;
        T result = caseDefinition(definition);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.PROCEDURE_DEF:
      {
        ProcedureDef procedureDef = (ProcedureDef)theEObject;
        T result = caseProcedureDef(procedureDef);
        if (result == null) result = caseDefinition(procedureDef);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.CONDITION:
      {
        Condition condition = (Condition)theEObject;
        T result = caseCondition(condition);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.HAY_BOLITAS:
      {
        HayBolitas hayBolitas = (HayBolitas)theEObject;
        T result = caseHayBolitas(hayBolitas);
        if (result == null) result = caseCondition(hayBolitas);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.COMMANDS:
      {
        Commands commands = (Commands)theEObject;
        T result = caseCommands(commands);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.PUT:
      {
        Put put = (Put)theEObject;
        T result = casePut(put);
        if (result == null) result = caseCommands(put);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.MOVE:
      {
        Move move = (Move)theEObject;
        T result = caseMove(move);
        if (result == null) result = caseCommands(move);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.IF_ELSE:
      {
        IfElse ifElse = (IfElse)theEObject;
        T result = caseIfElse(ifElse);
        if (result == null) result = caseCommands(ifElse);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.TYPE_MOVEMENT:
      {
        TypeMovement typeMovement = (TypeMovement)theEObject;
        T result = caseTypeMovement(typeMovement);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.WEST:
      {
        West west = (West)theEObject;
        T result = caseWest(west);
        if (result == null) result = caseTypeMovement(west);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.EAST:
      {
        East east = (East)theEObject;
        T result = caseEast(east);
        if (result == null) result = caseTypeMovement(east);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.NORTH:
      {
        North north = (North)theEObject;
        T result = caseNorth(north);
        if (result == null) result = caseTypeMovement(north);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.SOUTH:
      {
        South south = (South)theEObject;
        T result = caseSouth(south);
        if (result == null) result = caseTypeMovement(south);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.TYPE_COLOR:
      {
        TypeColor typeColor = (TypeColor)theEObject;
        T result = caseTypeColor(typeColor);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.BLACK:
      {
        Black black = (Black)theEObject;
        T result = caseBlack(black);
        if (result == null) result = caseTypeColor(black);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.RED:
      {
        Red red = (Red)theEObject;
        T result = caseRed(red);
        if (result == null) result = caseTypeColor(red);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.BLUE:
      {
        Blue blue = (Blue)theEObject;
        T result = caseBlue(blue);
        if (result == null) result = caseTypeColor(blue);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case MinigobstonesPackage.GREEN:
      {
        Green green = (Green)theEObject;
        T result = caseGreen(green);
        if (result == null) result = caseTypeColor(green);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      default: return defaultCase(theEObject);
    }
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Init Structure</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Init Structure</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseInitStructure(InitStructure object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Definition</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Definition</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseDefinition(Definition object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Procedure Def</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Procedure Def</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseProcedureDef(ProcedureDef object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Condition</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Condition</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseCondition(Condition object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Hay Bolitas</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Hay Bolitas</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseHayBolitas(HayBolitas object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Commands</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Commands</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseCommands(Commands object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Put</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Put</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T casePut(Put object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Move</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Move</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseMove(Move object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>If Else</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>If Else</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseIfElse(IfElse object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Type Movement</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Type Movement</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseTypeMovement(TypeMovement object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>West</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>West</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseWest(West object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>East</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>East</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseEast(East object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>North</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>North</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseNorth(North object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>South</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>South</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseSouth(South object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Type Color</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Type Color</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseTypeColor(TypeColor object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Black</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Black</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseBlack(Black object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Red</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Red</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseRed(Red object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Blue</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Blue</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseBlue(Blue object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>Green</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>Green</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
   * @generated
   */
  public T caseGreen(Green object)
  {
    return null;
  }

  /**
   * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
   * <!-- begin-user-doc -->
   * This implementation returns null;
   * returning a non-null result will terminate the switch, but this is the last case anyway.
   * <!-- end-user-doc -->
   * @param object the target of the switch.
   * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
   * @see #doSwitch(org.eclipse.emf.ecore.EObject)
   * @generated
   */
  @Override
  public T defaultCase(EObject object)
  {
    return null;
  }

} //MinigobstonesSwitch
